<?php
include_once('cont/cont.user.php');
include_once('cont/cont.anggota.php');

if(!isset($_SESSION['login'])){
		session_start();
	}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../assets/ico/favicon.ico">

    <title>Database STAPALA</title>
    <link href="view/bt/css/bootstrap.min.css" rel="stylesheet">
    <link href="view/bt/css/sticky-footer-navbar.css" rel="stylesheet">
  </head>

  <body>

    <!-- Fixed navbar -->
    <div class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">STAPALA</a>
        </div>
        <div class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#contact">Contact</a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="#">Action</a></li>
                <li><a href="#">Another action</a></li>
                <li><a href="#">Something else here</a></li>
                <li class="divider"></li>
                <li class="dropdown-header">Nav header</li>
                <li><a href="#">Separated link</a></li>
                <li><a href="#">One more separated link</a></li>
              </ul>
            </li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>

    
    <div class="container">
	<form id="ubah_spa" class="form-horizontal" method="post" action="#">
		<fieldset>

		<!-- Form Name -->
		<legend>Ubah Data Anggota</legend>
		
		<?php
		if($detail != NULL){
			foreach($detail as $row){
		?>
		
		<!-- File Button --> 
		<div class="control-group">
		  <label class="control-label" for="foto">Foto</label>
		  <div class="controls">
			<input id="foto" name="foto" class="input-file" type="file">
		  </div>
		</div>

		<!-- Text input-->
		<div class="form-group">
		  <label class="col-md-4 control-label" for="spa">SPA</label>  
		  <div class="col-md-5">
		  <input id="spa" name="spa" type="text" placeholder="No SPA" class="form-control input-md" required="" value="<?php echo $row[1] ;?>">
			
		  </div>
		</div>

		<!-- Password input-->
		<div class="form-group">
		  <label class="col-md-4 control-label" for="tahun_angkatan">Tahun Pelantikan</label>
		  <div class="col-md-5">
			<input id="tahun_angkatan" name="tahun_angkatan" type="text" " class="form-control input-md" required="" value="<?php echo $row[2] ;?>">
			
		  </div>
		</div>

		<!-- Password input-->
		<div class="form-group">
		  <label class="col-md-4 control-label" for="nama">Nama Anggota</label>
		  <div class="col-md-5">
			<input id="nama" name="nama" type="text" class="form-control input-md" required="" value="<?php echo $row[2] ;?>"> 
			
		  </div>
		</div>

		<!-- Text input-->
		<div class="form-group">
		  <label class="col-md-4 control-label" for="nama_tenar">Nama Tenar</label>  
		  <div class="col-md-5">
		  <input id="nama_tenar" name="nama_tenar" type="text" class="form-control input-md" required="" value="<?php echo $row[4] ;?>">
			
		  </div>
		</div>

		<!-- Text input-->
		<div class="form-group">
		  <label class="col-md-4 control-label" for="tempat_lahir">Tempat Lahir</label>  
		  <div class="col-md-5">
		  <input id="tempat_lahir" name="tempat_lahir" type="text" class="form-control input-md" required="" value="<?php echo $row[5] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="tanggal_lahir">Tanggal Lahir</label>  
		  <div class="col-md-5">
		  <input id="tanggal_lahir" name="tanggal_lahir" type="text"  class="form-control input-md" required="" value="<?php echo $row[6] ;?>">
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="agama">Agama</label>  
		  <div class="col-md-5">
		  <input id="agama" name="agama" type="text" class="form-control input-md" required="" value="<?php echo $row[7] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="alamat_ruma">Alamat Rumah</label>  
		  <div class="col-md-5">
		  <input id="alamat_rumah" name="alamat_rumah" type="text"  class="form-control input-md" required="" value="<?php echo $row[8] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="telp_rumah">Telepon Rumah</label>  
		  <div class="col-md-5">
		  <input id="telp_rumah" name="telp_rumah" type="text" class="form-control input-md" required="" value="<?php echo $row[9] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="hape">Handphone</label>  
		  <div class="col-md-5">
		  <input id="hape" name="hape" type="text" placeholder="Masukan No Handphone" class="form-control input-md" required="" value="<?php echo $row[10] ;?>"><br/>
		  <input id="hape2" name="hape2" type="text" class="form-control input-md" required="" value="<?php echo $row[11] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="email">Alamat Email</label>  
		  <div class="col-md-5">
		  <input id="email" name="email" type="text" class="form-control input-md" required="" value="<?php echo $row[12] ;?>"><br/>
		  
		  <input id="email2" name="email2" type="text"  class="form-control input-md" required="" value="<?php echo $row[13] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="kantor">Nama Kantor</label>  
		  <div class="col-md-5">
		  <input id="kantor" name="kantor" type="text" class="form-control input-md" required="" value="<?php echo $row[14] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="alamat_kantor">Alamat Kantor</label>  
		  <div class="col-md-5">
		  <input id="alamat_kantor" name="alamat_kantor" type="text" class="form-control input-md" required="" value="<?php echo $row[15] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="telp_kantor">Telepon Kantor</label>  
		  <div class="col-md-5">
		  <input id="telp_kantor" name="telp_kantor" type="text" class="form-control input-md" required="" value="<?php echo $row[16] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="facebook">Akun Facebook</label>  
		  <div class="col-md-5">
		  <input id="facebook" name="facebook" type="text" class="form-control input-md" required="" value="<?php echo $row[17] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="twitter">Akun Twitter</label>  
		  <div class="col-md-5">
		  <input id="twitter" name="twitter" type="text" class="form-control input-md" required="" value="<?php echo $row[18] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="korwil">Korwil</label>  
		  <div class="col-md-5">
		  <input id="korwil" name="korwil" type="text" class="form-control input-md" required="" value="<?php echo $row[19] ;?>">
			
		  </div>
		</div>
		
		<div class="form-group">
		  <label class="col-md-4 control-label" for="subkorwil">Sub Korwil</label>  
		  <div class="col-md-5">
		  <input id="subkorwil" name="subkorwil" type="text" class="form-control input-md" required="" value="<?php echo $row[20] ;?>">
			
		  </div>
		</div>

		<!-- Button (Double) -->
		<div class="form-group">
		  <label class="col-md-4 control-label" for="ubah_user"></label>
		  <div class="col-md-8">
			<button id="ubah_user" name="ubah_user" class="btn btn-success">Simpan</button>
			<button id="Batal" name="Batal" class="btn btn-danger">Scary Button</button>
		  </div>
		</div>
		
		<?php
			}
		}
		?>

		</fieldset>
		</form>
	</div>
	
</body>
</html>